<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>index</title>
    <!-- 引入Vue -->
    <script type="text/javascript" src="../../js/vue.js"></script>
  </head>
  <body>
    <!-- 准备好一个容器-->
    <div id="demo"></div>

    <script type="text/javascript">

      const School = {
        name:'School',
        template:`
          <div>
            <h2>学校名称：{{schoolName}}</h2>  
            <h2>学校地址：{{schoolAddress}}</h2>  
          </div>
        `,
        data(){
          return {
            schoolName:'尚硅谷',
            schoolAddress:'北京'
          }
        }
      }

      new Vue({
        el:'#demo',
        template:'<School/>',
        components:{School}
      })

    </script>
  </body>
</html>